3.989 \(\int x^m (1-\frac {a x}{2})^n (2+a x)^n \, dx\)

Optimal. Leaf size=42 \[ \frac {2^n x^{m+1} \, _2F_1\left (\frac {m+1}{2},-n;\frac {m+3}{2};\frac {a^2 x^2}{4}\right )}{m+1} \]

[Out]

2^n*x^(1+m)*hypergeom([-n, 1/2+1/2*m],[3/2+1/2*m],1/4*a^2*x^2)/(1+m)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {125, 364} \[ \frac {2^n x^{m+1} \, _2F_1\left (\frac {m+1}{2},-n;\frac {m+3}{2};\frac {a^2 x^2}{4}\right )}{m+1} \]

Antiderivative was successfully verified.

[In]

Int[x^m*(1 - (a*x)/2)^n*(2 + a*x)^n,x]

[Out]

(2^n*x^(1 + m)*Hypergeometric2F1[(1 + m)/2, -n, (3 + m)/2, (a^2*x^2)/4])/(1 + m)

Rule 125

Int[((f_.)*(x_))^(p_.)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[(a*c + b*d*x^2)
^m*(f*x)^p, x] /; FreeQ[{a, b, c, d, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[m - n, 0] && GtQ[a, 0] && GtQ
[c, 0]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin {align*} \int x^m \left (1-\frac {a x}{2}\right )^n (2+a x)^n \, dx &=\int x^m \left (2-\frac {a^2 x^2}{2}\right )^n \, dx\\ &=\frac {2^n x^{1+m} \, _2F_1\left (\frac {1+m}{2},-n;\frac {3+m}{2};\frac {a^2 x^2}{4}\right )}{1+m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 42, normalized size = 1.00 \[ \frac {2^n x^{m+1} \, _2F_1\left (\frac {m+1}{2},-n;\frac {m+3}{2};\frac {a^2 x^2}{4}\right )}{m+1} \]

Antiderivative was successfully verified.

[In]

Integrate[x^m*(1 - (a*x)/2)^n*(2 + a*x)^n,x]

[Out]

(2^n*x^(1 + m)*Hypergeometric2F1[(1 + m)/2, -n, (3 + m)/2, (a^2*x^2)/4])/(1 + m)

________________________________________________________________________________________

fricas [F]  time = 0.89, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (a x + 2\right )}^{n} {\left (-\frac {1}{2} \, a x + 1\right )}^{n} x^{m}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(1-1/2*a*x)^n*(a*x+2)^n,x, algorithm="fricas")

[Out]

integral((a*x + 2)^n*(-1/2*a*x + 1)^n*x^m, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a x + 2\right )}^{n} {\left (-\frac {1}{2} \, a x + 1\right )}^{n} x^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(1-1/2*a*x)^n*(a*x+2)^n,x, algorithm="giac")

[Out]

integrate((a*x + 2)^n*(-1/2*a*x + 1)^n*x^m, x)

________________________________________________________________________________________

maple [F]  time = 0.16, size = 0, normalized size = 0.00 \[ \int x^{m} \left (-\frac {a x}{2}+1\right )^{n} \left (a x +2\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(1-1/2*a*x)^n*(a*x+2)^n,x)

[Out]

int(x^m*(1-1/2*a*x)^n*(a*x+2)^n,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a x + 2\right )}^{n} {\left (-\frac {1}{2} \, a x + 1\right )}^{n} x^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(1-1/2*a*x)^n*(a*x+2)^n,x, algorithm="maxima")

[Out]

integrate((a*x + 2)^n*(-1/2*a*x + 1)^n*x^m, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int x^m\,{\left (a\,x+2\right )}^n\,{\left (1-\frac {a\,x}{2}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(a*x + 2)^n*(1 - (a*x)/2)^n,x)

[Out]

int(x^m*(a*x + 2)^n*(1 - (a*x)/2)^n, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(1-1/2*a*x)**n*(a*x+2)**n,x)

[Out]

Timed out

________________________________________________________________________________________